package hcn.protocol.ods.report;

import com.fasterxml.jackson.annotation.JsonGetter;
import com.fasterxml.jackson.annotation.JsonIgnore;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlTransient;
import java.util.List;

/**
 * Created by jinxin on 2016/7/14.
 */
public class LabBioDetailBean {

    private String bioNO;           //细菌顺序号
    private InnerBean bioType;      //微生物类型
    private InnerBean bio;          //细菌代码/名称
    private String bioQuantity;     //细菌数量
    private String bioUnit;         //细菌数量单位
    private String expertsPrompt;   //专家提示
    private InnerBean labDevice;    //检验仪器
    private String remark;          //备注
    private List<LabAntiDetailBean> antiDetails;        //药敏结果

    public String getBioNO() {
        return bioNO;
    }

    public void setBioNO(String bioNO) {
        this.bioNO = bioNO;
    }

    @JsonIgnore
    @JsonGetter
    public InnerBean getBioType() {
        return bioType;
    }

    public void setBioType(InnerBean bioType) {
        this.bioType = bioType;
    }

    @XmlTransient
    public String getBioTypeId(){
        return bioType != null ? bioType.getText() : null;
    }

    @XmlTransient
    public String getBioTypeName(){
        return bioType != null ? bioType.getDisplayName() : null;
    }

    @JsonIgnore
    @JsonGetter
    public InnerBean getBio() {
        return bio;
    }

    @XmlTransient
    public String getBioId(){
        return bio != null ? bio.getText() : null;
    }

    @XmlTransient
    public String getBioName(){
        return bio != null ? bio.getDisplayName() : null;
    }

    public void setBio(InnerBean bio) {
        this.bio = bio;
    }

    public String getBioQuantity() {
        return bioQuantity;
    }

    public void setBioQuantity(String bioQuantity) {
        this.bioQuantity = bioQuantity;
    }

    public String getBioUnit() {
        return bioUnit;
    }

    public void setBioUnit(String bioUnit) {
        this.bioUnit = bioUnit;
    }

    public String getExpertsPrompt() {
        return expertsPrompt;
    }

    public void setExpertsPrompt(String expertsPrompt) {
        this.expertsPrompt = expertsPrompt;
    }

    @JsonIgnore
    @JsonGetter
    public InnerBean getLabDevice() {
        return labDevice;
    }

    @XmlTransient
    public String getLabDeviceId(){
        return labDevice != null ? labDevice.getText() : null;
    }

    @XmlTransient
    public String getLabDeviceName(){
        return labDevice != null ? labDevice.getDisplayName() : null;
    }

    public void setLabDevice(InnerBean labDevice) {
        this.labDevice = labDevice;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @XmlElementWrapper(name = "antiResults")
    @XmlElement(name = "detail")
    public List<LabAntiDetailBean> getAntiDetails() {
        return antiDetails;
    }

    public void setAntiDetails(List<LabAntiDetailBean> antiDetails) {
        this.antiDetails = antiDetails;
    }
}
